<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld"%>
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
<% 
Object lang=session.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
String languageCode="zh_CN";
if(lang!=null){
	languageCode=lang.toString();
}
	Locale locale =SessionHelper.getLocaleByUser(request);
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>收件箱</title>
<base href="<%=ViewUtil.getRequestPath(request)%>">
<%

	String sysId = request.getParameter("sysId");
%>
<link href="static/css/custom/lantop/css/custom.css" type="text/css"  rel="stylesheet">
<jsp:include
	page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
<jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
<script type="text/javascript"
	src="avicit/cbb/techclass/mymessage/MyMessageTabInbox.js"></script>
	<script type="text/javascript"
	src="avicit/cbb/techclass/mymessage/locale/language_<%=languageCode%>.js"></script>
	
<script type="text/javascript">
var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
var myDatagrid;//数据表格 
var sysId;
var iframeWidth;
var myColNumbers;

$(function() {
	sysId = "<%=sysId%>";
		myDatagrid = $("#inBoxDataGrid");
		iframeWidth = document.documentElement.clientWidth;
		myColNumbers = 6;
		setFitColumns(iframeWidth, myColNumbers);
		top.getMessageCount();
	});

function keyDownQuery(){
	if(event.keyCode==13){
		getResultByInput();
	}
}
function getResultByInput(){
	$('#inBoxDataGrid').datagrid({
		 url: 'platform/cbb/MyMessageController/getInboxData.json?sysId=' + sysId + '&inputWord=' + encodeURI(encodeURI($('#query').val()))
	});
} 
	
</script>
<style type="text/css">
.textbox {
	border: solid 1px #a5acb5;
}

.input,img {
	vertical-align: middle;
}

.labelbg {
	background:
		url('../../js/jQuery/jquery-easyui-1.3.5/themes/icons/required.gif')
		right 0 no-repeat;
}

.datagrid-toolbar-extend {
	top: 80px;
}
</style>
</head>
<body id="myBody" class="easyui-layout" fit="true">
	<div data-options="region:'center'">
		<div id="toolbarTabinboxMessage" class="datagrid-toolbar"
			style="height: auto;display: block;">
			<div id="ganttButton" style="position: relative;padding:10px 20px;">
				<sec:accesscontrollist hasPermission="3"
					domainObject="mymessage_MyMessageTabInbox_button_setRead">
					<a title="设置为已读" href="javascript:void(0)" class="easyui-linkbutton selbtn" onclick="setRead();">
					<img  src="avicit/im/lantop/common/search/image/icon_tool034_blue.png"><span class="selbtc">设置为已读</span></a>
				</sec:accesscontrollist>
				<div class="search_input">
					 <input placeholder="快速检索" type="text" id="query" onblur="getResultByInput()" onkeydown="keyDownQuery();" />
					 <img src="avicit/im/lantop/common/search/image/icon_tool14.png">
				</div>
			</div>
		</div>
		<table id="inBoxDataGrid"
			data-options="
				rownumbers: false,
				animate: true,
				collapsible: false,
				fitColumns: true,
				autoRowHeight: false,
				singleSelect: false,
				pagination:true,
				pageSize:20, 
				pageList:[20,30,50], 
	    		striped:true,
	    		toolbar:'#toolbarTabinboxMessage',
				fit:true,
				method: 'post',
				scrollbarSize:0
			">
			<thead>
				<tr>
					<sec:accesscontrollist hasPermission="3"
						domainObject="mymessage_MyMessageTabInbox_inBoxDataGrid_ID">
						<%--主键ID --%>
						<th data-options="field:'id', halign:'center',checkbox:true"
							title="主键ID" width="50px"><%=PlatformLocalesJSTL.getBundleValue("lantop.psncenter.mymessage.Inbox.pkid","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<th data-options="field:'numbers', halign:'center' ,align:'center',formatter:formatOrder"  title="序号" width="10px">序号</th>
					<sec:accesscontrollist hasPermission="3"
						domainObject="mymessage_MyMessageTabInbox_inBoxDataGrid_detail">
						<!-- 提醒类型 --><!-- //update by Tangkun 19/03/28 -->
						<th
							data-options="field:'MESS_TYPE', halign:'center', align:'center' ,editor:{type:'text'}"
							width="30px" title="提醒类型">提醒类型</th>
					</sec:accesscontrollist> 
					<sec:accesscontrollist hasPermission="3"
						domainObject="mymessage_MyMessageTabInbox_inBoxDataGrid_MESS_TITLE">
						<th
							data-options="field:'MESS_TITLE', halign:'center', align:'left !important',editor:{type:'text'}, formatter:formatHref"
							width="100px" title="标题"><%=PlatformLocalesJSTL.getBundleValue("lantop.psncenter.mymessage.Inbox.title","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="mymessage_MyMessageTabInbox_inBoxDataGrid_messReceiveUserName">
						<th
							data-options="field:'xxx', halign:'center', align:'center',editor:{type:'text'}, formatter:formatFHS"
							width="30px" title="发送人"><%=PlatformLocalesJSTL.getBundleValue("lantop.psncenter.mymessage.Inbox.sendperson","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="mymessage_MyMessageTabInbox_inBoxDataGrid_MESS_SEND_DATE">
						<th
							data-options="field:'MESS_SEND_DATE', halign:'center', align:'center',editor:{type:'text'}"
							width="40px" title="接收时间"><%=PlatformLocalesJSTL.getBundleValue("lantop.psncenter.mymessage.Inbox.sendtime","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="mymessage_MyMessageTabInbox_inBoxDataGrid_setRead">
						<%--消息状态--%>
						<th
							data-options="field:'messStatus', halign:'center', align:'center',editor:{type:'text'}"
							width="20px" title="是否已读">是否已读</th>
					</sec:accesscontrollist>
				</tr>
			</thead>
		</table>
	</div>
</body>
<script type="text/javascript" src="static/js/platform/index/js/divscroll.js" ></script>
<script>
	$(function(){
		$(".datagrid-view2").find(".datagrid-body").perfectScrollbar();
	});
</script>
</html>
